home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1995 March / PC Plus Super CD (Issue 101) (March 1995).iso / sharewar / vbaddon / vbfiles / fdesk.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-08-26  |  11.6 KB  |  359 lines

  1. VERSION 2.00
  2. Begin Form fdesk 
  3.    BackColor       =   &H0080FFFF&
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   5805
  6.    ClientLeft      =   450
  7.    ClientTop       =   870
  8.    ClientWidth     =   8670
  9.    ControlBox      =   0   'False
  10.    Height          =   6270
  11.    Left            =   360
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   5805
  15.    ScaleWidth      =   8670
  16.    Top             =   495
  17.    Width           =   8850
  18.    Begin vsInForm InForm 
  19.       BarColor        =   &H00800080&
  20.       BarColorInactive=   &H00800080&
  21.       BarHeight       =   16
  22.       ButtonsLeft     =   3  '3
  23.       ButtonsRight    =   2  '2
  24.       CapAlign        =   1  'Left Center
  25.       CapColor        =   &H00FFFFFF&
  26.       CapColorInactive=   &H00FFFFFF&
  27.       Caption         =   " VideoSoft SmartDesk"
  28.       ClipMon         =   -1  'True
  29.       FontBold        =   -1  'True
  30.       FontItalic      =   0   'False
  31.       FontName        =   "Small Fonts"
  32.       FontSize        =   6.75
  33.       FontStrikethru  =   0   'False
  34.       FontUnderline   =   0   'False
  35.       FrameColor      =   &H00C0C0C0&
  36.       FrameColorInactive=   &H00C0C0C0&
  37.       FrameStyle      =   4  'Raised Frame
  38.       FrameWidth      =   10
  39.       Left            =   5460
  40.       PictLeft0       =   FDESK.FRX:0000
  41.       PictLeft1       =   FDESK.FRX:00CA
  42.       PictLeft2       =   FDESK.FRX:0194
  43.       PictRight0      =   FDESK.FRX:025E
  44.       PictRight1      =   FDESK.FRX:0328
  45.       Top             =   4830
  46.    End
  47.    Begin PictureBox Picture4 
  48.       BackColor       =   &H00C0C0C0&
  49.       Height          =   5025
  50.       Left            =   105
  51.       ScaleHeight     =   4215
  52.       ScaleWidth      =   4800
  53.       TabIndex        =   2
  54.       Top             =   240
  55.       Width           =   5100
  56.       Begin vsInForm vsInForm3 
  57.          AcceptFiles     =   -1  'True
  58.          BarColorInactive=   &H00808000&
  59.          BarHeight       =   34
  60.          ButtonsLeft     =   0  '0
  61.          ButtonsRight    =   3  '3
  62.          CapColorInactive=   &H00FFFFFF&
  63.          Caption         =   "Visual Printer"
  64.          CustomFrame     =   -1  'True
  65.          FontBold        =   -1  'True
  66.          FontItalic      =   0   'False
  67.          FontName        =   "Arial"
  68.          FontSize        =   12
  69.          FontStrikethru  =   0   'False
  70.          FontUnderline   =   0   'False
  71.          FrameColor      =   &H00C0C0C0&
  72.          FrameColorInactive=   &H00C0C0C0&
  73.          FrameCorners    =   0   'False
  74.          FrameSizing     =   0  'None
  75.          FrameStyle      =   3  'Raised Form
  76.          FrameWidth      =   10
  77.          Left            =   420
  78.          PictRight0      =   FDESK.FRX:03F2
  79.          PictRight1      =   FDESK.FRX:05FC
  80.          PictRight2      =   FDESK.FRX:07E6
  81.          Top             =   -210
  82.       End
  83.       Begin vsViewPort vsViewPort1 
  84.          BackColor       =   &H00808080&
  85.          Height          =   4005
  86.          Left            =   105
  87.          Top             =   105
  88.          VirtualHeight   =   0
  89.          VirtualWidth    =   0
  90.          Width           =   4530
  91.          Begin vsPrinter vsPrinter1 
  92.             AbortCaption    =   ""
  93.             FontName        =   "Arial"
  94.             FontSize        =   24
  95.             HdrColor        =   &H00FF0000&
  96.             HdrFontBold     =   -1  'True
  97.             HdrFontName     =   "Bookman Old Style"
  98.             HdrFontSize     =   18
  99.             Header          =   "|VideoSoft VSView"
  100.             Height          =   2430
  101.             Left            =   105
  102.             Top             =   105
  103.             Width           =   2640
  104.          End
  105.       End
  106.    End
  107.    Begin PictureBox Picture1 
  108.       BackColor       =   &H00C0C0C0&
  109.       Height          =   1590
  110.       Index           =   0
  111.       Left            =   5460
  112.       ScaleHeight     =   840
  113.       ScaleWidth      =   2655
  114.       TabIndex        =   0
  115.       Top             =   210
  116.       Width           =   2955
  117.       Begin vsInForm VSInForm2 
  118.          BarColor        =   &H00808000&
  119.          BarColorInactive=   &H00800080&
  120.          BarHeight       =   30
  121.          BarStyle        =   3  'Raised
  122.          ButtonsLeft     =   0  '0
  123.          CapAlign        =   1  'Left Center
  124.          CapColor        =   &H00FFFFFF&
  125.          CapColorInactive=   &H00FFFFFF&
  126.          Caption         =   "  Most used API Calls"
  127.          CustomFrame     =   -1  'True
  128.          FrameColor      =   &H00C0C0C0&
  129.          FrameColorInactive=   &H00C0C0C0&
  130.          FrameCorners    =   0   'False
  131.          FrameSizing     =   0  'None
  132.          FrameStyle      =   3  'Raised Form
  133.          FrameWidth      =   10
  134.          Index           =   0
  135.          Left            =   -15
  136.          Top             =   -135
  137.       End
  138.       Begin Label lStatus 
  139.          BackStyle       =   0  'Transparent
  140.          FontBold        =   0   'False
  141.          FontItalic      =   0   'False
  142.          FontName        =   "MS Sans Serif"
  143.          FontSize        =   8.25
  144.          FontStrikethru  =   0   'False
  145.          FontUnderline   =   0   'False
  146.          Height          =   645
  147.          Index           =   0
  148.          Left            =   0
  149.          TabIndex        =   1
  150.          Top             =   105
  151.          Width           =   2535
  152.       End
  153.    End
  154.    Begin PictureBox Picture1 
  155.       BackColor       =   &H00C0C0C0&
  156.       Height          =   2220
  157.       Index           =   1
  158.       Left            =   5460
  159.       ScaleHeight     =   1470
  160.       ScaleWidth      =   2655
  161.       TabIndex        =   3
  162.       Top             =   2205
  163.       Width           =   2955
  164.       Begin ComboBox cmb_printers 
  165.          Height          =   300
  166.          Left            =   630
  167.          Style           =   2  'Dropdown List
  168.          TabIndex        =   5
  169.          Top             =   105
  170.          Width           =   1905
  171.       End
  172.       Begin vsInForm VSInForm2 
  173.          BarColor        =   &H00800080&
  174.          BarColorInactive=   &H00800080&
  175.          BarHeight       =   30
  176.          BarStyle        =   3  'Raised
  177.          ButtonsLeft     =   0  '0
  178.          CapAlign        =   1  'Left Center
  179.          CapColor        =   &H00FFFFFF&
  180.          CapColorInactive=   &H00FFFFFF&
  181.          Caption         =   "  Printer Settings"
  182.          CustomFrame     =   -1  'True
  183.          FrameColor      =   &H00C0C0C0&
  184.          FrameColorInactive=   &H00C0C0C0&
  185.          FrameCorners    =   0   'False
  186.          FrameSizing     =   0  'None
  187.          FrameStyle      =   3  'Raised Form
  188.          FrameWidth      =   10
  189.          Index           =   2
  190.          Left            =   -15
  191.          Top             =   495
  192.       End
  193.       Begin Label lStatus 
  194.          BackStyle       =   0  'Transparent
  195.          FontBold        =   0   'False
  196.          FontItalic      =   0   'False
  197.          FontName        =   "MS Sans Serif"
  198.          FontSize        =   8.25
  199.          FontStrikethru  =   0   'False
  200.          FontUnderline   =   0   'False
  201.          Height          =   960
  202.          Index           =   1
  203.          Left            =   0
  204.          TabIndex        =   4
  205.          Top             =   525
  206.          Width           =   2640
  207.       End
  208.    End
  209.    Begin Image Pin 
  210.       Height          =   150
  211.       Index           =   0
  212.       Left            =   105
  213.       Picture         =   FDESK.FRX:09E0
  214.       Top             =   0
  215.       Visible         =   0   'False
  216.       Width           =   150
  217.    End
  218.    Begin Image Pin 
  219.       Height          =   150
  220.       Index           =   1
  221.       Left            =   300
  222.       Picture         =   FDESK.FRX:0AAA
  223.       Top             =   60
  224.       Visible         =   0   'False
  225.       Width           =   150
  226.    End
  227. Option Explicit
  228. Sub cmb_printers_Click ()
  229. Dim s$
  230.   mousepointer = 11
  231.   vsPrinter1.Device = cmb_printers.List(cmb_printers.ListIndex)
  232.   s = "Orientation: " + vsPrinter1.Orientation + Chr(13)
  233.   s = s + "DPI: " + vsPrinter1.DPI + Chr(13)
  234.   s = s + "Port: :" + vsPrinter1.Port + Chr(13)
  235.   s = s + "Driver: :" + vsPrinter1.Driver
  236.   lStatus(1) = s
  237.   mousepointer = 0
  238. End Sub
  239. Sub Form_Load ()
  240.   Inform.CustomFrame = True
  241.   Dim s$
  242.   'Most Used APIs
  243.   s = "Mem: " + Format(Inform.FreeMemory \ 1024, "#,###") + "k" + Chr(13)
  244.   s = s + "Sys:" + Str(Inform.FreeSystem) + "%"
  245.   s = s + " Usr:" + Str(Inform.FreeUser) + "%"
  246.   s = s + " GDI:" + Str(Inform.FreeGDI) + "%"
  247.   lStatus(0) = s
  248.   ' Display Printer Settings
  249.   Dim i%
  250.   For i = 0 To vsPrinter1.NDevices - 1
  251.     cmb_printers.AddItem vsPrinter1.Devices(i)
  252.   Next i
  253.   cmb_printers.ListIndex = 0
  254.   vsPrinter1.Width = vsPrinter1.PageWidth
  255.   vsPrinter1.Height = vsPrinter1.PageHeight
  256.   VSViewPort1.VirtualWidth = vsPrinter1.PageWidth
  257.   VSViewPort1.VirtualHeight = vsPrinter1.PageHeight
  258.   Me.Show
  259.   vsPrinter1.Preview = True
  260.   MsgBox " Drag TEXT files from File Manager to the Visual Printer"
  261. End Sub
  262. Sub Form_Paint ()
  263.   'VSPrinter1.Top = VSViewPort1.VirtualHeight / 2
  264. End Sub
  265. Sub GoPrint (c As Control)
  266.   Dim i%, fn$, fl&
  267.   vsPrinter1.PageBorder = 3   'top and bottom
  268.   For i = 0 To c.NumFiles - 1
  269.     ' set header and footer
  270.     fn = c.FileName(i)
  271.     fl = FileLen(fn)
  272.     vsPrinter1.FileName = fn
  273.     vsPrinter1.Header = fn + "||Page %d"
  274.     vsPrinter1.Footer = FileDateTime(fn) + "|VideoSoft VSView|"
  275.     If fl > 10 * 1024 Then
  276.       vsPrinter1.Footer = vsPrinter1.Footer + Format(fl / 1024, "###,###,###") + " K bytes"
  277.     Else
  278.       vsPrinter1.Footer = vsPrinter1.Footer + Format(fl, "###,###,###") + " bytes"
  279.     End If
  280.     vsPrinter1.Action = 1
  281.   Next
  282.   Form_Paint
  283. End Sub
  284. Sub InForm_ClickLButton (Button As Integer)
  285.   Dim s$
  286.   Select Case Button
  287.     ' button 0 is end
  288.     Case 0
  289.       Unload Me
  290.     ' button 1 is keep on top
  291.     Case 1
  292.       Inform.OnTop = Not Inform.OnTop
  293.       If Inform.OnTop Then
  294.         Inform.PictLeft1 = Pin(1)
  295.       Else
  296.         Inform.PictLeft1 = Pin(0)
  297.       End If
  298.     ' button 2 is help
  299.     Case 2
  300.       s = "Drag files from the file manager into the Visual printer"
  301.       s = s + Chr(13) + "Use pin button to keep the window on top"
  302.       MsgBox s
  303.   End Select
  304. End Sub
  305. Sub InForm_ClickRButton (Button As Integer)
  306.   Select Case Button
  307.     ' button 0 is maximize/restore
  308.     Case 0
  309.       InForm_DblClickCaption
  310.     ' button 1 is minimize
  311.     Case 1
  312.       WindowState = 1
  313.   End Select
  314. End Sub
  315. Sub InForm_DblClickCaption ()
  316.   If WindowState = 0 Then
  317.     WindowState = 2
  318.   ElseIf WindowState = 2 Then
  319.     WindowState = 0
  320.   End If
  321. End Sub
  322. Sub InForm_NewClipboardData ()
  323.  ' eV = Clipboard.GetText()
  324.  ' If eV = "" Then
  325.  '   eV.Picture = Clipboard.GetData()
  326.  ' End If
  327. End Sub
  328. Sub vsInForm3_ClickRButton (Button As Integer)
  329.   Static Zoom%
  330.   mousepointer = 11
  331.   DoEvents
  332.   Select Case Button
  333.       Case 0    'Zoom
  334.           Zoom = Zoom + 20
  335.           If Zoom > 100 Then Zoom = 20
  336.           vsPrinter1.Width = vsPrinter1.PageWidth * Zoom / 100 * 2.15
  337.           vsPrinter1.Height = vsPrinter1.PageHeight * Zoom / 100 * 2.15
  338.           VSViewPort1.VirtualWidth = vsPrinter1.Width
  339.           VSViewPort1.VirtualHeight = vsPrinter1.Height
  340.       Case 1      'Print file
  341.       Case 2      'Clear the printer
  342.           vsPrinter1.PageBorder = 0   'none
  343.           vsPrinter1.Header = ""
  344.           vsPrinter1.Footer = ""
  345.           vsPrinter1.Action = 3
  346.           vsPrinter1.Action = 6
  347.           
  348.   End Select
  349.   mousepointer = 0
  350. End Sub
  351. Sub vsInForm3_DropFile ()
  352.   ' print file
  353.   mousepointer = 11
  354.   vsPrinter1.Preview = True
  355.   vsPrinter1.PreviewPage = 1
  356.   GoPrint vsInform3
  357.   mousepointer = 0
  358. End Sub
  359.